//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsFormData, CmsFormDataResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsFormDataList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsFormDataResponse>(`/uctoo/cms_form_data/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsFormData = async (id: string) => {
  return requestClient.get<CmsFormData>(`/uctoo/cms_form_data/${id}`);
};

export const adductooCmsFormData = async (data: Partial<CmsFormData>) => {
  return requestClient.post<CmsFormData>('/uctoo/cms_form_data/add', data);
};

export const edituctooCmsFormData = async (data: Partial<CmsFormData>) => {
  return requestClient.post<CmsFormData>('/uctoo/cms_form_data/edit', data);
};

export const deleteuctooCmsFormData = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_form_data/del', { id });
};
